<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
</style>
<script src="../vue.js"></script>

<body>
  <div id="app">
    <my-component>成功渲染</my-component>
  </div>

  <script>
    // rander:渲染函数
    Vue.component("my-component", {
      render(createElement) {
        return createElement("h1", {
          style: {
            color: "pink",
            fontSize: "80px",
            fontWeight: "400",
            backgroundColor: "#ccc"
          }
        }, this.$slots.default)
      }
    })

    var vm = new Vue({
      el: "#app"
    })
  </script>
</body>

</html>